<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/hpp_c1_c2.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<%@ include file="/common/meta.jsp" %>
<title>VTC - Holistic Programme Planning - HPP</title>
<%@ include file="/common/css_js.jsp"%>

<script type="text/javascript">
	
	var validator;

	$(document).ready(function() {

		$("#mainForm").validate({
			rules : {
				"stream.streamCode" : {
					maxlength : 50
				},
				"stream.titleShort" : {
					maxlength : 100
				},
				"stream.titleLong" : {
					maxlength : 1000
				},
				"stream.titleZhShort" : {
					maxlength : 100
				},
				"stream.titleZhLong" : {
					maxlength : 1000
				}
			}
		});
	});
	
	$(document).ready(function() {
		$("#mainForm").validate();
		
		$("#closeBtn",window.parent.document).mousedown(function(){
			window.parent.location="programme-info.action?programmeId=<s:property value='programmeId'/>";		
		});
	});
	
	function clickBtn(action){
		switch(action){
		case "cancel":
			window.parent.location="programme-info.action?programmeId=<s:property value='programmeId'/>";
			CE.close();
			return;
		}
	}
	
</script> 

</head>
<body>
<div class="bodyBlank">
  <div class="padding"> 
  
    <div class="bodyBlank2">
      <div class="pageTitle">Stream Leader</div>

			<div class="form2">
			
			  <span class="errorLabel" id="errorMsgSpan"></span>
			  <s:actionerror/>
			  <s:fielderror/>
			  <s:actionmessage/> 
			  
			  <s:form id="mainForm" name="mainForm" namespace="/programme" 
			  		  action="stream!save.action?no-decorate" validate="true">
				<s:hidden name="programmeId"></s:hidden>
				<s:hidden name="stream.id"></s:hidden>
				<s:hidden name="stream.duration"></s:hidden>
				<s:hidden name="stream.durationType"></s:hidden>
					
                <table cellspacing="0" cellpadding="0" border="0">
                <tbody><tr>
                  <td class="fLabel"> Stream Code </td>
                  <td class="fField">
                  	 <s:textfield id="code" name="stream.code" cssStyle="width:90px" readonly="true"/> 
                  	 <s:textfield id="streamCode" name="stream.streamCode" cssStyle="width:200px" cssClass="required"/>
                  </td>
                </tr>
                <tr>
                  <td class="fLabel"> Stream Title (Short) </td>
                  <td class="fField">
                  	<s:textfield id="stream.titleShort" name="stream.titleShort" cssStyle="width:300px" cssClass="inputText required"/>
                  </td>
                </tr>
                <tr>
                  <td class="fLabel"> Stream Title (Long) </td>
                  <td class="fField">
                  	<s:textfield id="stream.titleLong" name="stream.titleLong" cssStyle="width:300px" cssClass="inputText required"/>
                  </td>
                </tr>
                <tr>
                  <td class="fLabel"> Stream Title in Chinese (Short) </td>
                  <td class="fField">
                  	<s:textfield id="stream.titleZhShort" name="stream.titleZhShort" cssStyle="width:300px" cssClass="inputText required" />
                  </td>
                </tr>
                <tr>
                  <td class="fLabel"> Stream Title in Chinese (Long) </td>
                  <td class="fField">
                  	<s:textfield id="stream.titleZhLong" name="stream.titleZhLong" cssStyle="width:300px" cssClass="inputText required"/>
                  </td>
                </tr>
              </tbody></table>
              <div class="btnSet btnSetTypeB">
                <div class="left">
                 <s:if test="canEdit">	
                  <div class="button">
                    <div class="left">
                      <div class="right">
                        <s:submit value="Save" cssClass="inputButton"></s:submit>
                      </div>
                    </div>
                  </div>
                  </s:if>
                  <div class="button">
                    <div class="left">
                      <div class="right">
                        <input type="button" onclick="clickBtn('cancel')" value="Cancel" name="" id="" class="inputButton">
                      </div>
                    </div>
                  </div>
                </div>
              </div>
           
            </s:form>  
         </div>  
           
           
		 <s:if test="stream!=null&&stream.id!=null&stream.id!=''">
				<div class="wTab">
		         <table cellspacing="0" cellpadding="0" border="0" id="wMu">
		            <tbody>
			           <tr>
			             <td id="itemA" class="item2">
			             	<a href="programme-plan-projection-type.action?no-decorate&programmeId=<s:property value='stream.id'/>" 
			                 target="programmeIframe" onclick="selectTab('wMu', 'itemA');">Programme Plan Projection Type</a></td>
			             <td id="itemB" class="item1">
			             	<a href="offering-campus.action?no-decorate&programmeId=<s:property value='stream.id'/>" target="programmeIframe"
			                 onclick="selectTab('wMu', 'itemB');">Offering Campus</a></td>
			             <td id="itemC" class="item1">
						   <a href="curriculum-hour.action?no-decorate&programmeId=<s:property value='stream.id'/>" target="programmeIframe"
			                 onclick="selectTab('wMu', 'itemC');">Curriculum Hours</a></td>
			             <td id="itemD" class="item1">
			               <a href="programme-leader.action?no-decorate&programmeId=<s:property value='stream.id'/>" target="programmeIframe"
			                 onclick="selectTab('wMu', 'itemD');">Programme Leader</a></td>	                 	                 
			           </tr>
		         	</tbody>
		         </table>
		       </div>  
		       
			 
			   <iframe id="programmeIframe" name="programmeIframe" src="programme-plan-projection-type.action?no-decorate&programmeId=<s:property value='stream.id'/>" style="width:100%;" frameborder="0" scrolling="no"></iframe>
		       
		  </s:if>               
    </div>
    
</div>
</div>

</body>
</html>   